This disclosure relates to text document analysis, and more particularly to an analysis device, an analysis method, and a computer program product that analyzes text documents.
Examples of analysis devices that analyze text documents are known. There are instances in which it is desirable to use a computer to seek with what frequency and in which sentence context (for example, of a particular nuance) a target word appears in a document. For example, with a document in which is written an appraisal of a restaurant, there are times when it is desirable to objectively judge a specific dish of the restaurant by investigating if the specific dish offered by the restaurant is included in a sentence of a certain context.
In such a situation, a computer first receives from a user a specification of the target dish name. The computer extracts from the target document all of the sentences that include the target dish name. Subsequently, the computer analyzes the context for each of the extracted sentences, and it detects whether each sentence is a sentence with an affirmative nuance context or is a sentence with a negative nuance context.
The computer then computes an occurrence frequency of sentences with an affirmative nuance context and an occurrence frequency of sentences with a negative nuance context, and it outputs the computed occurrence frequencies as values that express the reputation of the restaurant. However, with such processing, when the quantity of target documents is large, the analysis time becomes extended.
Additionally, there are times when, as a result of having investigated the reputation of a certain single dish of the restaurant, the user may also wish to investigate the reputation of another dish that is offered by the restaurant. In such a case, the computer must repeat the identical processing for the other dish. Accordingly, when investigating by specifying a plurality of words to be investigated, the computation cost of the computer becomes large.